﻿using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using CtrLayer;
using ExceptionLayer;

namespace TestLayer
{
    /// <summary>
    /// Summary description for AddArtAuction
    /// </summary>
    [TestClass]
    public class AddArtAuction
    {
        private AuctionCtrl _auCtr;

        public AddArtAuction()
        {
            //_auCtr = new AuctionCtrl();
        }

        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        [TestInitialize]
        public void AddArtToAuctionTestInitialize()
        {
            Console.Out.WriteLine("AddArtToAuctionTestInitialize called");
            _auCtr = new AuctionCtrl();
        }

        [TestCleanup]
        public void AddArtToAuctionTestCleanup()
        {
            Console.Out.WriteLine("AddArtToAuctionTestCleanup called");
        }

        [TestMethod]
        public void TestAddArt()
        {           
            try
            {
                _auCtr.AddArtToAuction(5, 1);
            }
            catch (UCNEmptyException e)
            {
                Assert.Fail("Should throw a UCNEmptyException");
                throw e;
            }
        }
    }
}
